VERSION 5.00
Object = "{C4847593-972C-11D0-9567-00A0C9273C2A}#8.0#0"; "crviewer.dll"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{B3FB64BF-91F9-11D7-A482-0008A14158BC}#2.22#0"; "ITGControls.ocx"
Begin VB.Form frmMaintSalesman 
   BackColor       =   &H00F7D9C2&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   7095
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   10770
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   7095
   ScaleWidth      =   10770
   ShowInTaskbar   =   0   'False
   Begin MSComctlLib.StatusBar sbRS 
      Align           =   2  'Align Bottom
      Height          =   255
      Left            =   0
      TabIndex        =   0
      Top             =   6840
      Width           =   10770
      _ExtentX        =   18997
      _ExtentY        =   450
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   2
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin ITGControls.ITGTab SSTab1 
      Height          =   5655
      Left            =   0
      TabIndex        =   48
      Top             =   1020
      Width           =   10605
      _ExtentX        =   18706
      _ExtentY        =   9975
      TabCount        =   2
      TabCaption(0)   =   "               Main               "
      TabContCtrlCnt(0)=   1
      Tab(0)ContCtrlCap(1)=   "ComunionFrames1"
      TabCaption(1)   =   "               List               "
      TabContCtrlCnt(1)=   1
      Tab(1)ContCtrlCap(1)=   "dtgList"
      TabTheme        =   2
      ActiveTabBackStartColor=   16250865
      ActiveTabBackEndColor=   16243138
      InActiveTabBackStartColor=   16243138
      InActiveTabBackEndColor=   16243138
      InActiveTabForeColor=   0
      BeginProperty ActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty InActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      OuterBorderColor=   4210752
      TopLeftInnerBorderColor=   4210752
      BottomRightInnerBorderColor=   4210752
      DisabledTabBackColor=   16243138
      DisabledTabForeColor=   -2147483630
      Begin MSDataGridLib.DataGrid dtgList 
         Height          =   5340
         Left            =   -75000
         TabIndex        =   44
         Top             =   315
         Width           =   10605
         _ExtentX        =   18706
         _ExtentY        =   9419
         _Version        =   393216
         AllowUpdate     =   0   'False
         AllowArrows     =   -1  'True
         Appearance      =   0
         HeadLines       =   1
         RowHeight       =   15
         TabAction       =   2
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   3
         BeginProperty Column00 
            DataField       =   "cCode"
            Caption         =   "Salesman ID"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "cName"
            Caption         =   "Salesman Name"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "cAddress"
            Caption         =   "Address"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   "#,##0.00"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            AllowRowSizing  =   0   'False
            BeginProperty Column00 
               ColumnAllowSizing=   -1  'True
               Locked          =   -1  'True
               ColumnWidth     =   1695.118
            EndProperty
            BeginProperty Column01 
               Locked          =   -1  'True
               ColumnWidth     =   4064.882
            EndProperty
            BeginProperty Column02 
               Locked          =   -1  'True
               ColumnWidth     =   4020.095
            EndProperty
         EndProperty
      End
      Begin ITGControls.ComunionFrames ComunionFrames1 
         Height          =   5325
         Left            =   0
         Top             =   315
         Width           =   10605
         _ExtentX        =   18706
         _ExtentY        =   9393
         FrameColor      =   4210752
         BackColor       =   16243138
         FillColor       =   16243138
         RoundedCorner   =   0   'False
         Caption         =   "Information"
         Alignment       =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ThemeColor      =   5
         ColorFrom       =   16243138
         ColorTo         =   16250865
         Begin VB.Timer Timer1 
            Interval        =   300
            Left            =   3195
            Top             =   450
         End
         Begin ITGControls.ITGTab SSTab2 
            Height          =   2850
            Left            =   0
            TabIndex        =   50
            Top             =   2490
            Width           =   10590
            _ExtentX        =   18680
            _ExtentY        =   5027
            TabCaption(0)   =   "     Basic     "
            TabContCtrlCnt(0)=   18
            Tab(0)ContCtrlCap(1)=   "txtPCDesc"
            Tab(0)ContCtrlCap(2)=   "txtPCCode"
            Tab(0)ContCtrlCap(3)=   "cd"
            Tab(0)ContCtrlCap(4)=   "txtPDDesc"
            Tab(0)ContCtrlCap(5)=   "txtMSDesc"
            Tab(0)ContCtrlCap(6)=   "txtPDCode"
            Tab(0)ContCtrlCap(7)=   "txtMSCode"
            Tab(0)ContCtrlCap(8)=   "txtCMDM"
            Tab(0)ContCtrlCap(9)=   "txtBalance"
            Tab(0)ContCtrlCap(10)=   "txtReturns"
            Tab(0)ContCtrlCap(11)=   "txtSales"
            Tab(0)ContCtrlCap(12)=   "txtCollection"
            Tab(0)ContCtrlCap(13)=   "txtInitial"
            Tab(0)ContCtrlCap(14)=   "cmdPickPD"
            Tab(0)ContCtrlCap(15)=   "cmdPickMS"
            Tab(0)ContCtrlCap(16)=   "cmdPickPC"
            Tab(0)ContCtrlCap(17)=   "ITGLabel1"
            Tab(0)ContCtrlCap(18)=   "iPhoto"
            TabCaption(1)   =   "     Transaction History     "
            TabContCtrlCnt(1)=   3
            Tab(1)ContCtrlCap(1)=   "dtgHistory"
            Tab(1)ContCtrlCap(2)=   "cmdHistory"
            Tab(1)ContCtrlCap(3)=   "Frame2"
            TabCaption(2)   =   "     Commission Quota     "
            TabContCtrlCnt(2)=   13
            Tab(2)ContCtrlCap(1)=   "txtDec"
            Tab(2)ContCtrlCap(2)=   "txtNov"
            Tab(2)ContCtrlCap(3)=   "txtOct"
            Tab(2)ContCtrlCap(4)=   "txtSep"
            Tab(2)ContCtrlCap(5)=   "txtAug"
            Tab(2)ContCtrlCap(6)=   "txtJul"
            Tab(2)ContCtrlCap(7)=   "txtJun"
            Tab(2)ContCtrlCap(8)=   "txtMay"
            Tab(2)ContCtrlCap(9)=   "txtApr"
            Tab(2)ContCtrlCap(10)=   "txtMar"
            Tab(2)ContCtrlCap(11)=   "txtFeb"
            Tab(2)ContCtrlCap(12)=   "txtJan"
            Tab(2)ContCtrlCap(13)=   "txtCommission"
            TabTheme        =   2
            ActiveTabBackEndColor=   16243138
            InActiveTabBackStartColor=   16243138
            InActiveTabBackEndColor=   16243138
            BeginProperty ActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty InActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            OuterBorderColor=   4210752
            TopLeftInnerBorderColor=   4210752
            BottomRightInnerBorderColor=   4210752
            DisabledTabBackColor=   16243138
            DisabledTabForeColor=   -2147483630
            Begin ITGControls.ITGTextBox txtDec 
               Height          =   285
               Left            =   -68100
               TabIndex        =   43
               Top             =   1935
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "December"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtNov 
               Height          =   285
               Left            =   -68100
               TabIndex        =   42
               Top             =   1620
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "November"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtOct 
               Height          =   285
               Left            =   -68100
               TabIndex        =   41
               Top             =   1305
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "October"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtSep 
               Height          =   285
               Left            =   -68100
               TabIndex        =   40
               Top             =   990
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "September"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtAug 
               Height          =   285
               Left            =   -71340
               TabIndex        =   38
               Top             =   1935
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "August"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtJul 
               Height          =   285
               Left            =   -71340
               TabIndex        =   37
               Top             =   1620
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "July"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtJun 
               Height          =   285
               Left            =   -71340
               TabIndex        =   36
               Top             =   1305
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "June"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtMay 
               Height          =   285
               Left            =   -71340
               TabIndex        =   35
               Top             =   990
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "May"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtApr 
               Height          =   285
               Left            =   -74700
               TabIndex        =   34
               Top             =   1935
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "April"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtMar 
               Height          =   285
               Left            =   -74700
               TabIndex        =   33
               Top             =   1620
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "March"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtFeb 
               Height          =   285
               Left            =   -74700
               TabIndex        =   32
               Top             =   1305
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "February"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtJan 
               Height          =   285
               Left            =   -74700
               TabIndex        =   31
               Top             =   990
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "January"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
            End
            Begin ITGControls.ITGTextBox txtCommission 
               Height          =   285
               Left            =   -68100
               TabIndex        =   39
               Top             =   675
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "Commission"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1435
               Enabled         =   0   'False
            End
            Begin MSDataGridLib.DataGrid dtgHistory 
               Height          =   2535
               Left            =   -72705
               TabIndex        =   30
               Top             =   315
               Width           =   8310
               _ExtentX        =   14658
               _ExtentY        =   4471
               _Version        =   393216
               HeadLines       =   1
               RowHeight       =   15
               FormatLocked    =   -1  'True
               BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               ColumnCount     =   6
               BeginProperty Column00 
                  DataField       =   "dDate"
                  Caption         =   "Date"
                  BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                     Type            =   1
                     Format          =   "MM/dd/yyyy"
                     HaveTrueFalseNull=   0
                     FirstDayOfWeek  =   0
                     FirstWeekOfYear =   0
                     LCID            =   1033
                     SubFormatType   =   3
                  EndProperty
               EndProperty
               BeginProperty Column01 
                  DataField       =   "cInvNo"
                  Caption         =   "Invoice No."
                  BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                     Type            =   0
                     Format          =   ""
                     HaveTrueFalseNull=   0
                     FirstDayOfWeek  =   0
                     FirstWeekOfYear =   0
                     LCID            =   1033
                     SubFormatType   =   0
                  EndProperty
               EndProperty
               BeginProperty Column02 
                  DataField       =   "nSales"
                  Caption         =   "Gross"
                  BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                     Type            =   1
                     Format          =   "#,##0.00"
                     HaveTrueFalseNull=   0
                     FirstDayOfWeek  =   0
                     FirstWeekOfYear =   0
                     LCID            =   1033
                     SubFormatType   =   1
                  EndProperty
               EndProperty
               BeginProperty Column03 
                  DataField       =   "nPaid"
                  Caption         =   "Payment"
                  BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                     Type            =   1
                     Format          =   "#,##0.00"
                     HaveTrueFalseNull=   0
                     FirstDayOfWeek  =   0
                     FirstWeekOfYear =   0
                     LCID            =   1033
                     SubFormatType   =   1
                  EndProperty
               EndProperty
               BeginProperty Column04 
                  DataField       =   "nCMDMReturn"
                  Caption         =   "CM/DM/Returns"
                  BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                     Type            =   1
                     Format          =   "#,##0.00"
                     HaveTrueFalseNull=   0
                     FirstDayOfWeek  =   0
                     FirstWeekOfYear =   0
                     LCID            =   1033
                     SubFormatType   =   1
                  EndProperty
               EndProperty
               BeginProperty Column05 
                  DataField       =   "nBalance"
                  Caption         =   "Balance"
                  BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                     Type            =   1
                     Format          =   "#,##0.00"
                     HaveTrueFalseNull=   0
                     FirstDayOfWeek  =   0
                     FirstWeekOfYear =   0
                     LCID            =   1033
                     SubFormatType   =   1
                  EndProperty
               EndProperty
               SplitCount      =   1
               BeginProperty Split0 
                  BeginProperty Column00 
                     ColumnWidth     =   1244.976
                  EndProperty
                  BeginProperty Column01 
                     ColumnWidth     =   1154.835
                  EndProperty
                  BeginProperty Column02 
                     Alignment       =   1
                  EndProperty
                  BeginProperty Column03 
                     Alignment       =   1
                  EndProperty
                  BeginProperty Column04 
                     Alignment       =   1
                  EndProperty
                  BeginProperty Column05 
                     Alignment       =   1
                  EndProperty
               EndProperty
            End
            Begin ITGControls.ITGCommandButton cmdHistory 
               Height          =   315
               Left            =   -74895
               TabIndex        =   45
               Top             =   1650
               Width           =   2115
               _ExtentX        =   3731
               _ExtentY        =   556
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Caption         =   "Show History"
            End
            Begin VB.Frame Frame2 
               Appearance      =   0  'Flat
               BackColor       =   &H00F7D9C2&
               Caption         =   " Date Range "
               ForeColor       =   &H80000008&
               Height          =   1260
               Left            =   -74895
               TabIndex        =   52
               Top             =   360
               Width           =   2115
               Begin ITGControls.ITGDateBox dtbTo 
                  Height          =   285
                  Left            =   660
                  TabIndex        =   29
                  Top             =   705
                  Width           =   1305
                  _ExtentX        =   2302
                  _ExtentY        =   503
                  BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                     Name            =   "Tahoma"
                     Size            =   8.25
                     Charset         =   0
                     Weight          =   400
                     Underline       =   0   'False
                     Italic          =   0   'False
                     Strikethrough   =   0   'False
                  EndProperty
                  Text            =   ""
                  SendKeysTab     =   -1  'True
               End
               Begin ITGControls.ITGDateBox dtbFrom 
                  Height          =   285
                  Left            =   660
                  TabIndex        =   28
                  Top             =   390
                  Width           =   1305
                  _ExtentX        =   2302
                  _ExtentY        =   503
                  BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                     Name            =   "Tahoma"
                     Size            =   8.25
                     Charset         =   0
                     Weight          =   400
                     Underline       =   0   'False
                     Italic          =   0   'False
                     Strikethrough   =   0   'False
                  EndProperty
                  Text            =   ""
                  SendKeysTab     =   -1  'True
               End
               Begin VB.Label Label2 
                  AutoSize        =   -1  'True
                  BackStyle       =   0  'Transparent
                  Caption         =   "To"
                  Height          =   195
                  Left            =   180
                  TabIndex        =   54
                  Top             =   705
                  Width           =   180
               End
               Begin VB.Label Label1 
                  AutoSize        =   -1  'True
                  BackStyle       =   0  'Transparent
                  Caption         =   "From"
                  Height          =   195
                  Left            =   165
                  TabIndex        =   53
                  Top             =   420
                  Width           =   360
               End
            End
            Begin ITGControls.ITGTextBox txtPCDesc 
               Height          =   285
               Left            =   3450
               TabIndex        =   23
               Top             =   1080
               Width           =   1815
               _ExtentX        =   3096
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Label           =   "ITGtext"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   1755
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtPCCode 
               Height          =   285
               Left            =   240
               TabIndex        =   21
               Top             =   1080
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BackColor       =   14745599
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Mandatory       =   -1  'True
               Label           =   "Unit Division"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1460
               TextBoxWidth    =   1285
               Required        =   -1  'True
            End
            Begin MSComDlg.CommonDialog cd 
               Left            =   6345
               Top             =   2055
               _ExtentX        =   847
               _ExtentY        =   847
               _Version        =   393216
            End
            Begin ITGControls.ITGTextBox txtPDDesc 
               Height          =   285
               Left            =   3450
               TabIndex        =   19
               Top             =   765
               Width           =   3405
               _ExtentX        =   5900
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Label           =   "ITGtext"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   3345
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtMSDesc 
               Height          =   285
               Left            =   3450
               TabIndex        =   15
               Top             =   450
               Width           =   3405
               _ExtentX        =   5900
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Label           =   "ITGtext"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   3345
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtPDCode 
               Height          =   285
               Left            =   240
               TabIndex        =   17
               Top             =   765
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BackColor       =   14745599
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Mandatory       =   -1  'True
               Label           =   "Product Division"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1460
               TextBoxWidth    =   1285
               Required        =   -1  'True
            End
            Begin ITGControls.ITGTextBox txtMSCode 
               Height          =   285
               Left            =   240
               TabIndex        =   13
               Top             =   450
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BackColor       =   14745599
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Mandatory       =   -1  'True
               Label           =   "Market Segment"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1460
               TextBoxWidth    =   1285
               Required        =   -1  'True
            End
            Begin ITGControls.ITGTextBox txtCMDM 
               Height          =   285
               Left            =   7080
               TabIndex        =   26
               Top             =   1710
               Width           =   2745
               _ExtentX        =   4630
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "Debit / Credit"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1375
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtBalance 
               Height          =   285
               Left            =   7080
               TabIndex        =   27
               Top             =   2025
               Width           =   2745
               _ExtentX        =   4630
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "Balance"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1375
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtReturns 
               Height          =   285
               Left            =   7080
               TabIndex        =   25
               Top             =   1395
               Width           =   2745
               _ExtentX        =   4630
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "Returns"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1375
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtSales 
               Height          =   285
               Left            =   7080
               TabIndex        =   20
               Top             =   746
               Width           =   2745
               _ExtentX        =   4630
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "Total Sales"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1375
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtCollection 
               Height          =   285
               Left            =   7080
               TabIndex        =   24
               Top             =   1061
               Width           =   2745
               _ExtentX        =   4630
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "Collection"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1375
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtInitial 
               Height          =   285
               Left            =   7080
               TabIndex        =   16
               Top             =   450
               Width           =   2745
               _ExtentX        =   4630
               _ExtentY        =   503
               BackColor       =   14737632
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               MaximumValue    =   9999999999.99
               DecimalPlace    =   2
               Label           =   "Initial"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1310
               TextBoxWidth    =   1375
               Enabled         =   0   'False
            End
            Begin VB.CommandButton cmdPickPD 
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   300
               Left            =   3090
               Picture         =   "frmMaintSalesman.frx":0000
               Style           =   1  'Graphical
               TabIndex        =   18
               Top             =   765
               Width           =   315
            End
            Begin VB.CommandButton cmdPickMS 
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   300
               Left            =   3090
               Picture         =   "frmMaintSalesman.frx":014A
               Style           =   1  'Graphical
               TabIndex        =   14
               Top             =   450
               Width           =   315
            End
            Begin VB.CommandButton cmdPickPC 
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   300
               Left            =   3090
               Picture         =   "frmMaintSalesman.frx":0294
               Style           =   1  'Graphical
               TabIndex        =   22
               Top             =   1080
               Width           =   315
            End
            Begin VB.Label ITGLabel1 
               AutoSize        =   -1  'True
               BackStyle       =   0  'Transparent
               Caption         =   "Salesman Image"
               Height          =   195
               Left            =   3930
               TabIndex        =   55
               Top             =   2310
               Width           =   1170
            End
            Begin VB.Image iPhoto 
               Appearance      =   0  'Flat
               BorderStyle     =   1  'Fixed Single
               DataField       =   "iPhoto"
               Height          =   1395
               Left            =   5295
               Stretch         =   -1  'True
               Top             =   1155
               Width           =   1545
            End
         End
         Begin ITGControls.ITGTextBox txtCountry 
            Height          =   285
            Left            =   4170
            TabIndex        =   10
            Tag             =   "cboCountry"
            Top             =   1725
            Visible         =   0   'False
            Width           =   1335
            _ExtentX        =   2249
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            MaxLength       =   50
            Mandatory       =   -1  'True
            Label           =   "Country"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   0
            TextBoxWidth    =   1275
         End
         Begin ITGControls.ITGTextBox txtAddress 
            Height          =   285
            Left            =   240
            TabIndex        =   4
            Tag             =   "S"
            Top             =   1125
            Width           =   6570
            _ExtentX        =   11377
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Mandatory       =   -1  'True
            Label           =   "Address"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1410
            TextBoxWidth    =   5100
            Required        =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtFax 
            Height          =   285
            Left            =   7050
            TabIndex        =   5
            Tag             =   "S"
            Top             =   1125
            Width           =   3285
            _ExtentX        =   5583
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            MaxLength       =   20
            Label           =   "Fax"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   900
            TextBoxWidth    =   2325
         End
         Begin ITGControls.ITGTextBox txtInternet 
            Height          =   285
            Left            =   7050
            TabIndex        =   8
            Tag             =   "S"
            Top             =   1425
            Width           =   3285
            _ExtentX        =   5583
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            MaxLength       =   50
            Label           =   "Website"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   900
            TextBoxWidth    =   2325
         End
         Begin ITGControls.ITGTextBox txtEMail 
            Height          =   285
            Left            =   7050
            TabIndex        =   12
            Tag             =   "S"
            Top             =   1725
            Width           =   3285
            _ExtentX        =   5583
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            MaxLength       =   50
            Label           =   "E-mail"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   900
            TextBoxWidth    =   2325
         End
         Begin ITGControls.ITGTextBox txtCity 
            Height          =   285
            Left            =   240
            TabIndex        =   6
            Tag             =   "S"
            Top             =   1425
            Width           =   3915
            _ExtentX        =   6694
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            MaxLength       =   50
            Label           =   "City / State"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1410
            TextBoxWidth    =   2445
         End
         Begin ITGControls.ITGTextBox txtState 
            Height          =   285
            Left            =   4140
            TabIndex        =   7
            Tag             =   "S"
            Top             =   1425
            Width           =   2670
            _ExtentX        =   4604
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            MaxLength       =   50
            Label           =   "Street"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   0
            TextBoxWidth    =   2610
         End
         Begin ITGControls.ITGTextBox txtZip 
            Height          =   285
            Left            =   5475
            TabIndex        =   11
            Tag             =   "S"
            Top             =   1725
            Width           =   1335
            _ExtentX        =   2249
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            MaxLength       =   10
            Label           =   "Street"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   0
            TextBoxWidth    =   1275
         End
         Begin ITGControls.ITGTextBox txtPhone 
            Height          =   285
            Left            =   7050
            TabIndex        =   3
            Tag             =   "S"
            Top             =   825
            Width           =   3285
            _ExtentX        =   5583
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            MaxLength       =   20
            Label           =   "Phone"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   900
            TextBoxWidth    =   2325
         End
         Begin ITGControls.ITGTextBox txtCode 
            Height          =   285
            Left            =   240
            TabIndex        =   1
            Top             =   525
            Width           =   3120
            _ExtentX        =   5292
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14745599
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Salesman ID"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1410
            TextBoxWidth    =   1650
            Required        =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtName 
            Height          =   285
            Left            =   240
            TabIndex        =   2
            Top             =   825
            Width           =   6570
            _ExtentX        =   11377
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14745599
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Mandatory       =   -1  'True
            Label           =   "Salesman Name"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1410
            TextBoxWidth    =   5100
            Required        =   -1  'True
         End
         Begin VB.ComboBox cboCountry 
            Height          =   315
            ItemData        =   "frmMaintSalesman.frx":03DE
            Left            =   1680
            List            =   "frmMaintSalesman.frx":03E0
            Style           =   2  'Dropdown List
            TabIndex        =   9
            Top             =   1725
            Width           =   2475
         End
         Begin ITGControls.ITGTextBox txttin 
            Height          =   285
            Left            =   7050
            TabIndex        =   56
            Top             =   2025
            Width           =   3285
            _ExtentX        =   5583
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Label           =   "TIN"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   900
            TextBoxWidth    =   2325
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Country / Zip"
            Height          =   195
            Left            =   285
            TabIndex        =   51
            Top             =   1725
            Width           =   945
         End
      End
      Begin CRVIEWERLibCtl.CRViewer ITGReportViewer 
         Height          =   6200
         Left            =   -74940
         TabIndex        =   49
         Top             =   360
         Visible         =   0   'False
         Width           =   10500
         lastProp        =   500
         _cx             =   5080
         _cy             =   5080
         DisplayGroupTree=   0   'False
         DisplayToolbar  =   -1  'True
         EnableGroupTree =   0   'False
         EnableNavigationControls=   -1  'True
         EnableStopButton=   -1  'True
         EnablePrintButton=   -1  'True
         EnableZoomControl=   -1  'True
         EnableCloseButton=   -1  'True
         EnableProgressControl=   -1  'True
         EnableSearchControl=   -1  'True
         EnableRefreshButton=   0   'False
         EnableDrillDown =   -1  'True
         EnableAnimationControl=   -1  'True
         EnableSelectExpertButton=   0   'False
         EnableToolbar   =   -1  'True
         DisplayBorder   =   0   'False
         DisplayTabs     =   0   'False
         DisplayBackgroundEdge=   -1  'True
         SelectionFormula=   ""
         EnablePopupMenu =   -1  'True
         EnableExportButton=   -1  'True
         EnableSearchExpertButton=   0   'False
         EnableHelpButton=   0   'False
         LaunchHTTPHyperlinksInNewBrowser=   -1  'True
      End
   End
   Begin VB.Shape Shape1 
      BorderColor     =   &H00404040&
      Height          =   975
      Left            =   0
      Top             =   0
      Width           =   9360
   End
   Begin VB.Image imgLogo 
      BorderStyle     =   1  'Fixed Single
      Height          =   930
      Left            =   9435
      Stretch         =   -1  'True
      Top             =   0
      Width           =   1125
   End
   Begin VB.Label lblHeader 
      BackColor       =   &H00F7D9C2&
      Caption         =   "Salesman ID - Salesman Name"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   180
      TabIndex        =   47
      Top             =   195
      Width           =   9165
   End
   Begin VB.Label lblDetails 
      BackColor       =   &H00F7D9C2&
      Caption         =   "Supplier Type"
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   180
      TabIndex        =   46
      Top             =   555
      Visible         =   0   'False
      Width           =   9000
   End
End
Attribute VB_Name = "frmMaintSalesman"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'IT Group Inc. 2005.09.23

Option Explicit

'Object variables





'Recordset variables
Private WithEvents rsHeader As ADODB.Recordset
Attribute rsHeader.VB_VarHelpID = -1

Private rsHistory As Recordset

'ADO Connection variables

Private connHeader As ADODB.Connection

'Form mode enumeration
Public Enum eSMMode
    Normal
    AddNewEdit
    Find
End Enum
Public Mode As eSMMode

'Other declaration
Public dtgName As String
Public sBit As String
Private vBM As Variant 'Recordset bookmark variable

Private sTempPath As String ' Path of the Picture : Temporary
Private stm As New ADODB.Stream

'Security Acess Level variables
Public lACNew As Boolean
Public lACEdit As Boolean
Public lACDelete As Boolean
Public lACPost As Boolean
Public lACCancel As Boolean
Public lACPrint As Boolean

Private Sub cboCountry_Click()
    txtCountry = Trim(cboCountry)
End Sub

Public Sub TBBrowseImage()
    
    ' Browse for picture then load on PictureBox
    cd.Filter = "Bitmap (*.bmp)|*.bmp| JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg| GIF (*.gif)|*.gif| All (*.bmp;*.jpg;*.jpeg;*.gif)|*.bmp;*.jpg;*.jpeg;*.gif"
    cd.FilterIndex = 4
    cd.FileName = ""
    cd.ShowOpen

    sTempPath = Trim$(cd.FileName)
    If (Trim(sTempPath) <> "") Then
        iPhoto.Picture = LoadPicture(sTempPath)
    Else
        iPhoto.Picture = Nothing
        Exit Sub
    End If

    If (iPhoto.Picture <> 0) Then
        stm.Type = adTypeBinary
        stm.Open
        stm.LoadFromFile sTempPath
        rsHeader!iPhoto = stm.Read
        stm.Close
        Set stm = Nothing
    Else
        rsHeader!iPhoto = Null
    End If

End Sub

Public Sub TBClearImage()
    iPhoto.Picture = Nothing
    rsHeader!iPhoto = Null
End Sub

Private Sub cboCountry_KeyPress(KeyAscii As Integer)
    SendKeysTab KeyAscii
End Sub

Private Sub cmdHistory_Click()
    
    If Not IsDate(dtbFrom.Text) Then
        MsgBox "Please input date parameter.", vbInformation, "ComUnion"
        dtbFrom.SetFocus
        Exit Sub
    ElseIf Not IsDate(dtbTo.Text) Then
        MsgBox "Please input date parameter.", vbInformation, "ComUnion"
        dtbTo.SetFocus
        Exit Sub
    End If
    
    Set rsHistory = Nothing
    Set rsHistory = New Recordset
    Set dtgHistory.DataSource = Nothing
    dtgHistory.Refresh
    
    sSQL = "SELECT * FROM V_History_Salesman WHERE cCode = '" & Trim(txtCode) & "' " & _
            "AND dDate BETWEEN '" & Trim(dtbFrom.Text) & "' AND '" & Trim(dtbTo.Text) & "'"
    rsHistory.Open sSQL, cn, adOpenForwardOnly, adLockReadOnly
    
    Set dtgHistory.DataSource = rsHistory

End Sub

Private Sub cmdPickPC_Click()
    If lPickListActive Then Exit Sub
    sFilterString = Trim(txtPCCode)
    'added condition
    frmITGPicker.Condition = "where cCompanyID = '" & COID & "'"
    frmITGPicker.zType = QProfitCenter
    frmITGPicker.Show vbModal
    txtPCCode = frmITGPicker.zCode
    txtPCDesc = frmITGPicker.zName
    If Trim(txtPCDesc) <> "" Then SendKeys "{Tab}"
End Sub

'Call pick list module
Private Sub cmdPickPD_Click()
    If lPickListActive Then Exit Sub
    frmITGPickList.mType = ProductDivision
    frmITGPickList.Show vbModal
    'rsHeader!cPDCode = frmITGPickList.mCode
    txtPDCode.Text = frmITGPickList.mCode
    txtPDDesc = frmITGPickList.mName
    If Trim(txtPDDesc) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub cmdPickMS_Click()
    If lPickListActive Then Exit Sub
    frmITGPickList.mType = MarketSegment
    frmITGPickList.Show vbModal
    'rsHeader!cMSCode = frmITGPickList.mCode
    txtMSCode.Text = frmITGPickList.mCode
    txtMSDesc = frmITGPickList.mName
    If Trim(txtMSDesc) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub dtgHistory_HeadClick(ByVal ColIndex As Integer)
On Error Resume Next
    SortGrid dtgHistory, ColIndex, rsHistory
End Sub

Private Sub dtgHistory_KeyDown(KeyCode As Integer, Shift As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If (Shift = vbCtrlMask And KeyCode = 45) Then
        TBNewLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
        TBDeleteLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
        TBSave
    End If
End Sub

Private Sub dtgList_HeadClick(ByVal ColIndex As Integer)
    SortGrid dtgList, ColIndex, rsHeader
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Dim iKey As Integer
    iKey = ToolbarIndex(KeyCode, Shift)
    If iKey <> 0 Then
        If ITGLedgerMain.tbrMain.Buttons(iKey).Enabled = True Then
            ToolbarFunction iKey
        End If
    End If
End Sub

'Set Your Object
Private Sub Form_Load()
        
    Set FrmName = Me
    FormSetup
    
    AcessBit Me, GetValueFrTable("AccessLevel", "SEC_ACCESSLEVEL", "RoleID = '" & SecUserRole & "' AND [Module] = 'MF24'")
    
    Set rsHeader = New ADODB.Recordset
    
    
    'CallComboBox Values
    Call LoadComboValues(cboCountry, "cValue", "PARAMETER_SYSTEM", "WHERE cType = 'COUNTRY'")
    
    FormLocking True
    FormSearch True
    SearchObj True
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
    BitVisible ITGLedgerMain.tbrMain, True
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
    
    imgLogo.Picture = ITGLedgerMain.Picture1.Picture
    Mode = Find
    txtCode.Locked = False
    
   
End Sub

'Activate your Toolbar Mode
Private Sub Form_Activate()
    TBBitReload
End Sub

'Release your Object
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
    If Mode = AddNewEdit Then
        MsgBox "Unable to close. You are in Add/New/Edit mode." & vbCr & _
            " Must Save or Undo", vbCritical, Me.Caption
        Cancel = True
        Exit Sub
    End If
    
    CloseMenuTab ITGLedgerMain
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = False
    
    
    
    
    
    Set rsHeader = Nothing
    Set rsHistory = Nothing
    Set connHeader = Nothing
    
    Set frmMaintSalesman = Nothing

    lCloseWindow = True
    
'    'oForm(Me.Tag).Mode = 1
'    'oForm(Me.Tag).Tag = Me.Tag
End Sub

'Add new record to the recordset
Public Sub TBNew()
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
    txtCode.BackColor = &HE0FFFF
    Mode = AddNewEdit
    
    If rsHeader.State <> adStateOpen Then
        OpenNewConnection connHeader
        OpenRecordsetWithCN rsHeader, "*", "SALESMAN", connHeader, "WHERE 1 = 0"
        SetDataSource
        SetDataField
    Else
        vBM = rsHeader.Bookmark
    End If
    
    rsHeader.AddNew
    rsHeader!cCompanyID = COID
    cboCountry = "Philippines"
    txtPCCode = sDivision
    rsHeader!cMSCode = "DEFAULT"  ' Code for asian shipping but we can use to other company
    rsHeader!cPDCode = "DEFAULT"  ' Code for asian shipping but we can use to other company
    
    Set FrmName = Me
    FormLocking False
    ClrRequired &HC0&
    cmdHistory.Enabled = False
    SSTab1.ActiveTab = 0
    SSTab2.ActiveTab = 0
    txtCode.SetFocus

End Sub

'Undo all changes to the recordset
Public Sub TBUndoAll()
On Error GoTo ErrorHandler

    Mode = Normal
    
    If rsHeader.Status = adRecNew Then TBUndoCurrent
    
    rsHeader.CancelBatch adAffectAll
    
    UnbindControls
    
    If rsHeader.RecordCount <> 0 Then rsHeader.Bookmark = vBM
    
    Set FrmName = Me
    FormLocking True
    cmdHistory.Enabled = True
    dtbFrom.Enabled = True
    dtbTo.Enabled = True
    
    If rsHeader.RecordCount <> 0 Then
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
    Else
        RSZero
        Mode = Find
    End If
    
    sbRS.Panels(2) = ""
    
    SetDataSource
    SetDataField

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoAll
    End If

End Sub

'Undo changes on the current record
Public Sub TBUndoCurrent()
On Error GoTo ErrorHandler

    If rsHeader.Status = adRecNew Then
        rsHeader.CancelUpdate
    Else
        rsHeader.CancelBatch adAffectCurrent
    End If
   
    If rsHeader.RecordCount = 0 Then RSZero
    
ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoCurrent
    End If

End Sub

'Save all changes
Public Sub TBSave()
Dim OKUpdate As Boolean
On Error GoTo ErrHandler

    'Audit Trail
    lBoolean = False
    If rsHeader.Status = adRecNew Then lBoolean = True
    
    If Not MandatoryOK Then Exit Sub
    
    If rsHeader.Status = adRecNew Then

    End If
    
    OKUpdate = False
    cn.BeginTrans
    connHeader.BeginTrans
    
    rsHeader.UpdateBatch adAffectAll
    
    cn.CommitTrans
    connHeader.CommitTrans
    OKUpdate = True
    
    Set FrmName = Me
    FormLocking True
    cmdHistory.Enabled = True
    dtbFrom.Enabled = True
    dtbTo.Enabled = True
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
    Mode = Normal
    
    
    MsgBox "Record/s successfully saved.", vbInformation, "ComUnion"
        
    'Audit trail
    UpdateLogFile "Salesman", Trim(txtCode), IIf(lBoolean, "Inserted", "Updated")
    
    lblHeader = rsHeader!cCode & " - " & rsHeader!cName & ""
    lblDetails = rsHeader!cAddress & ""
    sbRS.Panels(2) = ""

ErrHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217864 Then
        OKUpdate = True
        cn.RollbackTrans
        connHeader.RollbackTrans
        MsgBox "Record cannot be updated. Some values may have been changed by other user/s since last read." & vbCr & _
                "Records will be automatically refreshed. All changes made to the record will be gone upon refresh.", vbInformation, "ComUnion"
        vBookMark = rsHeader.Bookmark
        UnbindControls
        rsHeader.Requery
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
        Mode = Normal
        If rsHeader.RecordCount <> 0 Then
            Set FrmName = Me
            FormLocking True
            cmdHistory.Enabled = True
            dtbFrom.Enabled = True
            dtbTo.Enabled = True
            SetDataField
            SetDataSource
            rsHeader.Bookmark = vBookMark
        Else
            RSZero
        End If
    End If
    If Not OKUpdate Then
        MsgBox "Transaction update failed.", vbInformation, "ComUnion"
        cn.RollbackTrans
        connHeader.RollbackTrans
        ErrorLog err.Number, err.Description, Me.Name 'Error log
    End If
    
End Sub

'Sets the form & recorset to add/edit mode
Public Sub TBEdit()
    Mode = AddNewEdit
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , True, True, , , , True
    Set FrmName = Me
    FormLocking False
    ClrRequired &HC0&
    cmdHistory.Enabled = False
    txtCode.Locked = True
    SSTab2.ActiveTab = 0
    SSTab1.ActiveTab = 0
    txtName.SetFocus
    vBM = rsHeader.Bookmark
End Sub

'Delete record
Public Sub TBDelete()
On Error GoTo ErrorHandler
    
    If rsHeader.RecordCount = 0 Then Exit Sub
    
    Dim rs As New ADODB.Recordset
    Set rs = Nothing
    rs.Open "SELECT A.cSMan FROM VSalesman A, Salesman B WHERE A.cCompanyID = B.cCompanyID and A.cSMan = '" & Trim(txtCode) & "' ", cn, adOpenStatic
    
    If rs.RecordCount <> 0 Then
        MsgBox "Unable to delete. Referenced by other transactions.", vbExclamation, "ALERT"
        rs.Close
        GoTo ErrorHandler
    End If
    
    If MsgBox("Are you sure you want to delete this record?", vbQuestion + vbYesNo, "ComUnion") = vbNo Then Exit Sub
    
    'Audit trail
    UpdateLogFile "Salesman", Trim(txtCode), "Deleted"

    rsHeader.Delete adAffectCurrent
    rsHeader.UpdateBatch adAffectAll
    
    
    TBPrevRec

    Mode = Normal
    
    If rsHeader.RecordCount = 0 Then
        RSZero
    End If

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If

End Sub

'Search using the frmITGSearch
Public Sub TBFind()
    Mode = Normal
    txtCode.Locked = True
    frmITGSearch.Show
End Sub

'Search using the recordset primary key
Public Sub TBFindPrimary()
Dim sTemp As String
If Mode = Find Then
    FormWaitShow App.Path & "\Transmit.avi", "Loading data . . ."
            
    OpenNewConnection connHeader
    
    Set rsHeader = Nothing
    Set rsHeader = New ADODB.Recordset
    
    sTemp = Trim$(GetSearchString)
    If sTemp = "ERROR" Then
        MsgBox "Only Allows A - Z, 0 - 9, '.', ',' and %(wildcard)", vbExclamation, ""
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
        txtCode.Locked = False
        txtCode.SetFocus
        Exit Sub
    End If
                    
    OpenRecordsetWithCN rsHeader, "*", "SALESMAN", connHeader, IIf(sTemp = "", "", " WHERE " & sTemp)
                        
    Set FrmName = Me
    FormLocking True
    cmdHistory.Enabled = True
    dtbFrom.Enabled = True
    dtbTo.Enabled = True
               
    If rsHeader.RecordCount = 0 Then
        FormWaitHide
        MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
        RSZero
        FormSearch True
        SearchObj True
        Mode = Find
        Exit Sub
    End If
    SetDataSource
    SetDataField
    txtCode.BackColor = &HE0FFFF
    Mode = Normal
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True

    FormWaitHide
Else
    RSZero
    FormSearch True
    SearchObj True
    Mode = Find

   
End If

End Sub

'Reload menu buttons (do not delete this sub)
Public Sub TBBitReload()
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
    BitReload ITGLedgerMain, Me, ITGLedgerMain.tbrMain, sBit
    Set FrmName = Me
End Sub

'Close active window
Public Sub TBCloseWindow()
    Unload Me
End Sub

'Move first
Public Sub TBFirstRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveFirst rsHeader

End Sub

'Move previous
Public Sub TBPrevRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MovePrevious rsHeader
    

End Sub

'Move next
Public Sub TBNextRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveNext rsHeader
    

End Sub

'Move last
Public Sub TBLastRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveLast rsHeader
    

End Sub

'Add new line to the detail recordset
Public Sub TBNewLine()
    'Not Available
End Sub

'Delete line in the detail recordset
Public Sub TBDeleteLine()
On Error GoTo ErrorHandler


ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If

End Sub

'Undo all
Public Sub TBUndoLineAll()
On Error GoTo ErrorHandler

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If
End Sub

'Undo current line
Public Sub TBUndoLineCurrent()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Post current record
Public Sub TBPostRecord()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Cancel current record
Public Sub TBCancelRecord()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Print
Public Sub TBPrintRecord()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Sets the data source of the controls
Sub SetDataSource()
    Set FrmName = Me
    BindControls rsHeader
    Set dtgList.DataSource = rsHeader
    
   
End Sub
    
'Sets the data field for every bounded controls
Sub SetDataField()
    With rsHeader
        txtCode.DataField = !cCode
        txtName.DataField = !cName
        txtAddress.DataField = !cAddress
        txtCity.DataField = !cCity
        txtState.DataField = !cState
        txtCountry.DataField = !cCountry
        txtZip.DataField = !cZip
        txtPhone.DataField = !cTel
        txtFax.DataField = !cFax
        txtInternet.DataField = !cInternet
        txtEMail.DataField = !cEMail
        txtPCCode.DataField = !cPCCode
        txtMSCode.DataField = !cMSCode
        txtPDCode.DataField = !cPDCode
        txtInitial.DataField = !nBBalance
        txtSales.DataField = !nSales
        txtCMDM.DataField = !nCM_DM
        txtReturns.DataField = !nReturn
        txtCollection.DataField = !nCollection
        txtBalance.DataField = !nCBalance
        txtCommission.DataField = !nCommission
        txtJan.DataField = !nJan
        txtFeb.DataField = !nFeb
        txtMar.DataField = !nMar
        txtApr.DataField = !nApr
        txtMay.DataField = !nMay
        txtJun.DataField = !nJun
        txtJul.DataField = !nJul
        txtAug.DataField = !nAug
        txtSep.DataField = !nSep
        txtOct.DataField = !nOct
        txtNov.DataField = !nNov
        txtDec.DataField = !nDec
        txttin.DataField = !cTIN    '------------Added
    End With
End Sub

Private Sub iPhoto_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Mode <> AddNewEdit Then Exit Sub
    If Button = 2 Then PopupMenu ITGLedgerMain.mnuImage
End Sub

Private Sub iPhoto_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Mode = AddNewEdit Then
        iPhoto.ToolTipText = "Right click to add/remove image"
    Else
        iPhoto.ToolTipText = ""
    End If
End Sub

Private Sub rsHeader_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
On Error GoTo ErrorHandler
    
    If Not (rsHeader.EOF) Or Not (rsHeader.BOF) Then
        lblHeader = rsHeader!cCode & " - " & rsHeader!cName & ""
        lblDetails = rsHeader!cAddress & ""
        sbRS.Panels(1) = "Record: " & IIf((rsHeader.AbsolutePosition = -2), "0", rsHeader.AbsolutePosition) & "/" & rsHeader.RecordCount
        
        If rsHeader.Status <> adRecNew Then
            txtCode.Locked = True
        Else
            txtCode.Locked = False
        End If
        
        If Mode = AddNewEdit Then
            Select Case rsHeader.Status
                Case adRecNew
                    sbRS.Panels(2) = "New"
                Case adRecModified
                    sbRS.Panels(2) = "Modified"
                Case Else
                    sbRS.Panels(2) = ""
            End Select
        Else
            sbRS.Panels(2) = ""
        End If
    Else
        lblHeader = "Salesman ID - Salesman Name"
        lblDetails = "Address"
        sbRS.Panels(1) = "Record: 0/0"
        sbRS.Panels(2) = ""
        txtCode.Locked = False
    End If
    
    Set dtgHistory.DataSource = Nothing
    dtgHistory.Refresh
    dtbFrom.Text = "__/__/____"
    dtbTo.Text = "__/__/____"

ErrorHandler:
    'Err.Number -2147217885
    'Description - Row handle referred to a deleted row or a row marked for deletion.
    If err.Number = -2147217885 Then
        Resume Next
    End If
    
End Sub

Private Sub Timer1_Timer()
    If Mode = AddNewEdit Then
        SSTab2.TabEnabled(1) = False
    Else
        SSTab2.TabEnabled(1) = True
    End If
End Sub

'Private Sub txtCode_LostFocus()
'    'Does Code Already exists
'    If Mode = AddNewEdit Then
'        If Trim(txtCode) = "" Then
'            MsgBox "Empty primary input.", vbInformation, "ComUnion"
'            If FrmName.Name <> Me.Name Then PreviousTab frmComUnionMenuTab
'            txtCode.SetFocus
'        Else
'            If rsHeader.Status <> adRecNew Then Exit Sub
'            txtCode = Trim(txtCode)
'            If IDExisting(rsHeader, "cCode", "SALESMAN", Trim(rsHeader!cCode)) Then
'                MsgBox "Salesman ID already exists.", vbInformation, "ComUnion"
'                If FrmName.Name <> Me.Name Then PreviousTab frmComUnionMenuTab
'                txtCode.SetFocus
'            End If
'        End If
'    End If
'End Sub

Private Sub txtCountry_Change()
    If Trim(txtCountry) <> "" Or txtCountry <> vbNullString Then
        cboCountry = Trim(txtCountry)
    Else
        cboCountry.ListIndex = -1
    End If
End Sub

Private Sub txtMSCode_Change()
    txtMSDesc = ""
    txtMSDesc = GetValueFrTable("cDescription", "CLASSIFICATION", "cClassCode = '" & Trim(txtMSCode) & "' AND cType = 'MS'")
End Sub

Private Sub txtMSCode_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
    If Trim(txtMSDesc) = "" And Trim(txtMSCode) <> "" Then cmdPickMS_Click
End Sub

Private Sub txtPDCode_Change()
    txtPDDesc = ""
    txtPDDesc = GetValueFrTable("cDescription", "CLASSIFICATION", "cClassCode = '" & Trim(txtPDCode) & "' AND cType = 'PD'")
End Sub

'Check if all mandatory fields are complete
Function MandatoryOK() As Boolean
    
    MandatoryOK = True
    
    If Trim(txtCode) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Salesman ID' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
        txtCode.SetFocus
        Exit Function
    End If
    
    If rsHeader.Status = adRecNew Then
        If IDExisting(rsHeader, "cCode", "SALESMAN", Trim(rsHeader!cCode)) Then
            MandatoryOK = False
            MsgBox "Salesman ID already exists.", vbInformation, "ComUnion"
            txtCode.SetFocus
            Exit Function
        End If
    End If
    
    If Trim(txtName) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Salesman Name' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
        txtName.SetFocus
        Exit Function
    ElseIf Trim(txtAddress) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Address' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
        txtAddress.SetFocus
        Exit Function
    ElseIf Trim(txtCountry) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Country' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
        cboCountry.SetFocus
        Exit Function
    ElseIf Trim(txtMSCode) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Market Segment' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
        SSTab1.ActiveTab = 0
        txtMSCode.SetFocus
        Exit Function
    ElseIf Trim(txtPDCode) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Product Division' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
        SSTab1.ActiveTab = 0
        txtPDCode.SetFocus
        Exit Function
    End If

End Function

'Filter detail recordset to header's primary
Private Sub GetChild()
    '^&@$^#^@!#_^$!#$!
End Sub
Private Function GetSearchString() As String
On Error GoTo ErrorHandler
Dim sWhere As String

    GetSearchString = True

    If Trim$(txtCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cCode LIKE '" & Trim$(txtCode.Text) & "%'"
    End If

    If Trim$(txtName.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cName LIKE '" & Trim$(txtName.Text) & "%'"
    End If
    
    If Trim$(txtCity.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cCity LIKE '" & Trim$(txtCity.Text) & "%'"
    End If
    
    If Trim$(txtMSCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cMSCode LIKE '" & Trim$(txtMSCode.Text) & "%'"
    End If
    
    If Trim$(txtPDCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cPDCode LIKE '" & Trim$(txtPDCode.Text) & "%'"
    End If
    
    GetSearchString = Trim$(sWhere)

    Exit Function
ErrorHandler:
    GetSearchString = "ERROR"
End Function

'Sets the form if record number is zero
Private Sub RSZero()
    lblHeader = "Salesman ID - Salesman Name"
    lblDetails = "Address"
    sbRS.Panels(1) = "Record: 0/0"
    sbRS.Panels(2) = ""
    
    Set FrmName = Me
    UnbindControls
    TextClearing
    FormLocking True
    
    Set dtgHistory.DataSource = Nothing
    dtgHistory.Refresh
    dtbFrom.Text = "__/__/____"
    dtbTo.Text = "__/__/____"
    
    If rsHeader.State = adStateOpen Then rsHeader.Close
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
    
    txtCode.Locked = False
    txtCode.SetFocus
    
    Mode = Find
End Sub

Sub SearchObj(lEnable As Boolean)
    cmdPickMS.Enabled = lEnable
    cmdPickPD.Enabled = lEnable
End Sub

Private Sub txtPDCode_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
    If Trim(txtPDDesc) = "" And Trim(txtPDCode) <> "" Then cmdPickPD_Click
End Sub

'Public Sub ShowForm(sTranNo As String)
'    If Mode = Find Then
'
'        OpenNewConnection connHeader
'
'        Set rsHeader = Nothing
'        Set rsHeader = New ADODB.Recordset
'
'        OpenRecordsetWithCN rsHeader, "*", "SALESMAN", connHeader, "WHERE cCode = '" & Trim(sTranNo) & "'"
'
'        Set FrmName = Me
'        FormLocking True
'        cmdHistory.Enabled = True
'        dtbFrom.Enabled = True
'        dtbTo.Enabled = True
'
'        If rsHeader.RecordCount = 0 Then
'            FormWaitHide
'            MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
'            RSZero
'            FormSearch True
'            SearchObj True
'            Mode = Find
'            Exit Sub
'        End If
'            SetDataSource
'            SetDataField
'            txtCode.BackColor = &HE0FFFF
'            Mode = Normal
'            oBar.BitEnabled Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True, True
'
'    End If
'End Sub
